/*
 * @[H]:  Copyright (c) 2021 Phytium Information Technology, Inc. 
 * 
 *  SPDX-License-Identifier: Apache-2.0. 
 * 
 * @Date: 2021-08-05 17:29:09
 * @LastEditTime: 2021-08-06 09:25:31
 * @Description:  Description of file
 * @Modify History: 
 * * * Ver   Who        Date         Changes
 * * ----- ------     --------    --------------------------------------
 */

#include "f_pcie.h"
#include "parameters.h"

extern FPcieConfig FPcieConfigTable[FT_PCIE_NUM];

/**
 * @name: Ft_Uart_LookupConfig
 * @msg:  
 * @param {u32} instance_id 
 * @return {*}
 */
FPcieConfig *FPcieLookupConfig(u32 instance_id)
{
    FPcieConfig *ptr = NULL;
    u32 index;

    for (index = 0; index < (u32)FT_PCIE_NUM; index++)
    {
        if (FPcieConfigTable[index].instance_id == instance_id)
        {
            ptr = &FPcieConfigTable[index];
            break;
        }
    }

    return (FPcieConfig *)ptr;
}
